package com.itcast.dao;

import com.itcast.pojo.Menu;
import com.itcast.pojo.Role;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Set;

public interface MenuDao {

    @Select("select m.*  from t_menu m,t_role_menu rm where m.id = rm.menu_id and rm.role_id = #{roleID}")
    Set<Menu> findMenuIdByRoleId(@Param("roleID") int roleID);
    @Select("select * FROM t_menu where parentMenuId = #{id}")
    List<Menu> findById(@Param("id") int id);
}
